/*******************************************************************************
 * Course :					LOG210
 * Session :				winter 2012
 * Group :					02
 * Team :					3
 * Project :				Iteration 01
 * Students :				Nicolas Lefebvre			LEFN06078909
 * 							Jean-Philippe Chapdelaine	CHAJ13099001
 * 							Dalin Son					SOND05099000
 * 							Philippe Nichols			NICP29109007
 * Teacher :				François Caron
 * 							Jean-Philippe Martin
 * Created :				Jan 25, 2012
 * Date dern. modif. :		see revesion history
 * 
 * =============================================================
 *	Revision history
 * =============================================================
 *	Jan 25, 2012	Class created
*******************************************************************************/
package model;

public class Plat 
{
	private String nom = "";
	private String description = "";
	
	public String getNom() {
		return nom;
	}
	public void setNom(String nom) {
		this.nom = nom;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	public Plat() { }
	
	public Plat(String nom, String description)
	{
		this.nom = nom;
		this.description = description;
	}
	
	public String toString()
	{
		return this.nom + " : " + this.description;
	}
	
	public boolean equals(Object o)
	{
		boolean eq = false;
		if (o instanceof Plat) 
		{
			Plat c = (Plat) o;
			eq = this.hashCode() == c.hashCode();
		}
		return eq;
	}
	public int hashCode() 
	{
	    return this.nom.hashCode() ^ this.description.hashCode();
	}
}